#ifndef CAMERAVIEWWIDGET_H
#define CAMERAVIEWWIDGET_H

#include <QWidget>

#include "cameragraphicsview.h"

namespace Ui {
class CameraViewWidget;
}

class CameraViewWidget : public QWidget
{
    Q_OBJECT

public:
    explicit CameraViewWidget(QWidget *parent = nullptr);
    ~CameraViewWidget();

    // 设置待显示的图片
    void            SetImage(QImage image);
    // 设置文字提示信息
    void            SetInfo(QString info);

    void            ClearBackground();

private:
    int             m_nImageNum;
    // 控制双击是否显示图片详情的标志
    bool            m_bHasDetailInformation;
    bool            m_bHasImage;


protected:
    virtual void mouseDoubleClickEvent(QMouseEvent *event);

public:
    void            SetImageNum(int nImageNum){m_nImageNum = nImageNum;}
    void            SetHadDetailInformation(bool bValue){m_bHasDetailInformation = bValue;}
    void            SetImageResult(int nRet);
    QImage&         GetImage(){return m_viewBox->GetImage();}

private:
    Ui::CameraViewWidget *ui;

public:
    CameraGraphicsView* m_viewBox;

};

#endif // CAMERAVIEWWIDGET_H
